package com.dhcc.core.framework.base.entity;

import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.dhcc.core.modules.system.entity.User;

import io.swagger.annotations.ApiModelProperty;

/**
 * 数据Entity类
 * 
 * @ClassName: DataEntity
 * @Description: TODO
 * @author: cyf
 * @date: 2018年3月8日 下午4:20:27
 * @param <T>
 */
public abstract class DataEntity<T extends Model<?>> extends BaseEntity<T> {

    private static final long serialVersionUID = 1L;

    // 创建者
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(hidden=true)
    protected Long createBy;

    // 创建日期
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @ApiModelProperty(hidden=true)
    protected Date createDate;

    // 更新者
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(hidden=true)
    protected Long updateBy;

    // 更新日期
    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(hidden=true)
    protected Date updateDate;

    // 删除标记
    @ApiModelProperty(hidden=true)
    protected Boolean delFlag;

    // 创建者
    @TableField(exist = false)
    @ApiModelProperty(hidden=true)
    protected User createUser;

    // 修改者
    @TableField(exist = false)
    @ApiModelProperty(hidden=true)
    protected User updateUser;

    public DataEntity() {
        super();
        this.delFlag = false;
    }

    public DataEntity(Long id) {
        super(id);
        this.delFlag = false;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Boolean getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }

    public User getCreateUser() {
        return createUser;
    }

    public void setCreateUser(User createUser) {
        this.createUser = createUser;
    }

    public User getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(User updateUser) {
        this.updateUser = updateUser;
    }
    
    
}
